import ReactQuill from 'react-quill'
import 'react-quill/dist/quill.snow.css'
import { Breadcrumb, Form, Button } from 'antd'

const Quill = () => {
  const onFinish = (values: any) => {
    console.log('Success:', values)
  }
  return (
    <div>
      <div>
        <Form
          labelCol={{ span: 4 }}
          wrapperCol={{ span: 16 }}
          onFinish={onFinish}
          // 注意：此处需要为富文本编辑表示的 content 文章内容设置默认值
          initialValues={{ content: '' }}>
          <Form.Item
            label="内容"
            name="content"
            rules={[{ required: true, message: '请输入文章内容' }]}>
            <ReactQuill
              style={{height:"100px"}}
              theme="snow"
              placeholder="请输入文章内容"
            />
          </Form.Item>
          <Form.Item wrapperCol={{ offset: 4, span: 16 }}>
            <Button type="primary" htmlType="submit" style={{marginTop:"30px"}}>
              保存
            </Button>
          </Form.Item>
        </Form>
      </div>
    </div>
  )
}
export default Quill
